package com.jams.goodox.adapter;

import android.support.v4.content.ContextCompat;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.jams.goodox.R;
import com.jams.goodox.entity.resp.MyRecommendResp;

import java.util.List;

/**
 * Created by jams_zhen on 2016/12/27.
 */

public class RecommendAdapter extends BaseQuickAdapter<MyRecommendResp.DataBean.ResultListBean> {

    private static final int TYPE_ARRIVEED=1;//已到访
    private static final int TYPE_RAISE=2;//已认筹
    private static final int TYPE_RESERVED=3;//已预定
    private static final int TYPE_SIGNED=4;//已签约

    public RecommendAdapter(List<MyRecommendResp.DataBean.ResultListBean> data) {
        super(R.layout.item_recommend, data);
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, MyRecommendResp.DataBean.ResultListBean resultListBean) {
    }


    /**
     * 获取文字颜色,文字内容
     * @param type
     * @return
     */
    private Object[] getTextStrColor(int type){
        int txColor= ContextCompat.getColor(mContext,R.color.font_color_black);
        String txStr="已到访";
        switch (type){
            case TYPE_ARRIVEED:
                txColor= ContextCompat.getColor(mContext,R.color.font_color_black);
                txStr="已到访";
                break;
            case TYPE_RAISE:
                txColor= ContextCompat.getColor(mContext,R.color.main_theme);
                txStr="已认筹";
                break;
            case TYPE_RESERVED:
                txColor= ContextCompat.getColor(mContext,R.color.main_theme);
                txStr="已预定";
                break;
            case TYPE_SIGNED:
                txColor= ContextCompat.getColor(mContext,R.color.blue);
                txStr="已签约";
                break;
        }
        return new Object[]{txColor,txStr};
    }
}
